package org.jeecg.modules.oms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 半成品销售订单交易记录表
 */
@Data
@TableName("oms_semi_product_sales_order_transaction")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SemiProductSalesOrderTransaction对象", description = "半成品销售订单交易记录表")
public class SemiProductSalesOrderTransaction implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;
    
    /**
     * 订单ID
     */
    @ApiModelProperty(value = "订单ID")
    private String orderId;
    
    /**
     * 交易类型：1预付款 2尾款 3退款
     */
    @Excel(name = "交易类型", width = 15, dicCode = "transaction_type")
    @Dict(dicCode = "transaction_type")
    @ApiModelProperty(value = "交易类型：1预付款 2尾款 3退款")
    private Integer transactionType;
    
    /**
     * 交易金额
     */
    @Excel(name = "交易金额", width = 15)
    @ApiModelProperty(value = "交易金额")
    private BigDecimal amount;
    
    /**
     * 交易时间
     */
    @Excel(name = "交易时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "交易时间")
    private Date transactionTime;
    
    /**
     * 支付方式：1现金 2银行转账 3微信 4支付宝 5其他
     */
    @Excel(name = "支付方式", width = 15, dicCode = "payment_method")
    @Dict(dicCode = "payment_method")
    @ApiModelProperty(value = "支付方式：1现金 2银行转账 3微信 4支付宝 5其他")
    private Integer paymentMethod;
    
    /**
     * 交易凭证
     */
    @Excel(name = "交易凭证", width = 20)
    @ApiModelProperty(value = "交易凭证")
    private String transactionVoucher;
    
    /**
     * 交易描述
     */
    @Excel(name = "交易描述", width = 30)
    @ApiModelProperty(value = "交易描述")
    private String description;

    /**
     * 交易人ID
     */
    @ApiModelProperty(value = "交易人ID")
    private String transactionPersonId;

    /**
     * 交易人姓名
     */
    @Excel(name = "交易人", width = 15)
    @ApiModelProperty(value = "交易人姓名")
    @TableField(exist = false)
    private String transactionPersonName;
    
    /**
     * 备注
     */
    @Excel(name = "备注", width = 30)
    @ApiModelProperty(value = "备注")
    private String remark;
    
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    
    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    
    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;
}
